import axios from 'axios'
import React, { useState, useEffect } from 'react'
import { aUrl } from '../../../../static/axios_url'
import './index.css'
export default function Topupbill() {
    const [topbill, settopbill] = useState([])
    useEffect(() => {
        axios.post(aUrl + '/mycenter/myRec').then(res => {
            settopbill(res.data)
        })
    }, [])
    return (
        <div>
            <h3 className="tt">我的订单</h3>
            <ul className='topupbill'>
                <li>
                    <span>操作</span>
                    <span>充值金额</span>
                    <span>账户余额</span>
                    <span>时间</span>
                </li>
                {
                    topbill.map((topbill, i) => {
                        return <li key={i}>
                            <span>{topbill.r_type}</span>
                            <span>{topbill.r_num}</span>
                            <span>{topbill.r_yu}</span>
                            <span>{topbill.r_time}</span>
                        </li>
                    })
                }
            </ul>
        </div>
    )
}
